home *** CD-ROM | disk | FTP | other *** search
- Path: alpha.sky.net!ip53
- From: toma@sky.net (Tom Armstrong)
- Newsgroups: comp.os.ms-windows.programmer.ole,comp.lang.c++
- Subject: Re: Problems VC++4.0 & StringFromCLSID function
- Date: 18 Jan 1996 16:28:27 GMT
- Organization: SkyNET Online
- Message-ID: <4dlsfb$5ip@alpha.sky.net>
- References: <4djn2d$mps@earth.superlink.net>
- NNTP-Posting-Host: ip53.sky.net
- X-Newsreader: News Xpress Version 1.0 Beta #3
-
- In article <4djn2d$mps@earth.superlink.net>,
- ananda@mars.superlink.net (Ananda Subramaniam) wrote:
- >Hi,
- >
- >I have an OLE sample that I wrote and compiled in VC++ 2.0 without any
- problems.
- >However, when I tried to compile in VC++ 4.0, I had trouble with the
- >StringFromCLSID function.
- >
- >I get a message "cannot convert 2nd parameter char ** to unsigned short**"
- >
- >....
- >The compiler seems to think that LPOLESTR is of type unsigned short.
- >To further confirm this, I changed the type of my string to LPOLESTR and the
- >compiler went past StringFromCLSID function but complained on the next line
- >where I had AfxMessageBox(mystr). The compiler said "non of the 2 overloads
- can
- >covert parameter one from type unsigned short * "
- >
- >...
-
- >I am running out of ideas, plus it does not help being the only C++
- programmer
- >in the office. Any help will be appreciated.
-
- >Ananda
- >email: ananda@mars.superlink.net
-
- Ananda,
-
- One major change between VC++ 2.0 and VC++ 4.0 is the support for Unicode. All
- OLE functions require Unicode strings. That's why it wants and "unsigned
- short**". 2.x provided this translation for you, but 4.0 does not. Check out
- Tech Note 59. And if you need source examples, check out my FAQ under "General
- Questions"/"Converting from 2.0 to 4.0" at http://www.sky.net/~toma.
-
- TwA
-
-